input=imread('SD-Final-Dolomite2.bmp','bmp');
input=input';
[lx,ly]=size(input);
lz=11;


fid = fopen('Emily_BC.dat','wt');

for k=1:lz
    for j=1:ly
        for i=1:lx+2
            
        if ((i==1) || (i==lx+2) ||(k==1) ||(k==lz))
            fprintf(fid,'%1d\n',1);
        else
        fprintf(fid,'%1d\n',input(i-1,j));
        end
        
        end
    end
end
